package com.moshang.blog.mapper;

import com.moshang.blog.entity.SysRole;
import com.moshang.blog.entity.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Map;
import java.util.Set;

/**
 * 
 * 
 * @author moshang
 * @email 597575122@qq.com
 * @date 2018-09-21 14:45:09
 */
@Mapper
public interface SysUsersMapper extends BaseMapper<SysUser> {

     Map selectUserMenuCount();

     SysUser findUserByMap(Map<String, Object> map);

    void deleteUserRolesByUserId(@Param("userId") Integer id);
    void saveUserRoles(@Param("userId")Integer id, @Param("roleIds") Set<SysRole> roles);
}
